package com.example.bloom.myapplication;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by bloom on 2017/4/14.
 * 工作报告及工作报告评论的值
 * 工作报告的推送内容：不包含评论的字段
 * 工作消息回复的推送内容：不包含工作报告正文的内容但会有一个对应的工作报告ID（reportId）
 */
public class WorkReportMsgBean extends PushMessageBean implements Parcelable {

    /**
     * 以下是工作报告正文推送的字段（）
     *  对应的数据库表是：WorkMessageDALEx
     */
    private String reportId; //工作报告ID（主键唯一）
    private String reportType;// 工作报告类型类（1，2，3）
    private String reportTypeName;//工作报告类型名称
    private String reportTime;//工作报告时间
    private String submitTime; // 工作报告提交时间
    private String reportUserNumber; // 报告人E号
    private String reportUserName;// 报告人名
    private String reportContent; // 报告内容

    private String reportBelongs;//报告所属：1.我的报告，2 收到报告

    /**
     * 以下是工作消息评论回复推送的字段（会包含工作报告正文的reportId，唯一性）
     * 对应的数据库表是：WorkMessageReplyDALEx
     */
    private String replyUserNumber; // 回复人E号
    private String replyUserName;   //回复人
    private String replyTime;        //回复时间（最新）
    private String replyId;          // 回复id(评论消息主键唯一)（最新）
    private String replyContent;    //回复内容（最新）

    protected WorkReportMsgBean(Parcel in) {

        keyWord = in.readString();
        keyUUID = in.readString();
        messageId = in.readString();
        pushTime = in.readString();
        shortMessage = in.readString();

        reportId = in.readString();
        reportType = in.readString();
        reportTypeName = in.readString();
        reportTime = in.readString();
        submitTime = in.readString();
        reportBelongs=in.readString();

        reportUserNumber = in.readString();
        reportUserName = in.readString();
        reportContent = in.readString();

        replyUserNumber = in.readString();
        replyUserName = in.readString();

        replyTime = in.readString();
        replyId= in.readString();
        replyContent= in.readString();

        readStatus = in.readString();
    }

    public static final Creator<WorkReportMsgBean> CREATOR = new Creator<WorkReportMsgBean>() {
        @Override
        public WorkReportMsgBean createFromParcel(Parcel in) {
            return new WorkReportMsgBean(in);
        }

        @Override
        public WorkReportMsgBean[] newArray(int size) {
            return new WorkReportMsgBean[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {

        dest.writeString(keyWord);
        dest.writeString(keyUUID);
        dest.writeString(messageId);
        dest.writeString(pushTime);
        dest.writeString(shortMessage);

        dest.writeString(reportId);
        dest.writeString(reportType);
        dest.writeString(reportTypeName);
        dest.writeString(reportTime);
        dest.writeString(submitTime);
        dest.writeString(reportBelongs);

        dest.writeString(reportUserNumber);
        dest.writeString(reportUserName);
        dest.writeString(reportContent);
        dest.writeString(replyUserNumber);
        dest.writeString(replyUserName);
        dest.writeString(replyTime);
        dest.writeString(replyId);
        dest.writeString(replyContent);

        dest.writeString(readStatus);
    }

    public WorkReportMsgBean() {
    }

    public void setReportId(String reportId) {
        this.reportId = reportId;
    }
    public String getReportId() {
        return reportId;
    }

    public void setReportType(String reportType) {
        this.reportType = reportType;
    }

    public String getReportType() {
        return reportType;
    }

    public void setReportTypeName(String reportTypeName) {
        this.reportTypeName = reportTypeName;
    }

    public String getReportTypeName() {
        return reportTypeName;
    }

    public void setReportTime(String reportTime) {
        this.reportTime = reportTime;
    }

    public String getReportTime() {
        return reportTime;
    }

    public void setReportUserNumber(String reportUserNumber) {
        this.reportUserNumber = reportUserNumber;
    }

    public String getReportUserNumber() {
        return reportUserNumber;
    }

    public void setReportUserName(String reportUserName) {
        this.reportUserName = reportUserName;
    }

    public String getReportUserName() {
        return reportUserName;
    }

    public void setReportContent(String reportContent) {
        this.reportContent = reportContent;
    }

    public String getReportContent() {
        return reportContent;
    }

    public void setSubmitTime(String submitTime) {
        this.submitTime = submitTime;
    }

    public String getSubmitTime() {
        return submitTime;
    }

    public void setReplyUserNumber(String replyUserNumber) {
        this.replyUserNumber = replyUserNumber;
    }

    public String getReplyUserNumber() {
        return replyUserNumber;
    }

    public void setReplyUserName(String replyUserName) {
        this.replyUserName = replyUserName;
    }

    public String getReplyUserName() {
        return replyUserName;
    }

    public void setReplyTime(String replyTime) {
        this.replyTime = replyTime;
    }

    public String getReplyTime() {
        return replyTime;
    }

    public void setReplyId(String replayId) {
        this.replyId = replayId;
    }

    public String getReplyId() {
        return replyId;
    }

    public void setReplyContent(String replayContent) {
        this.replyContent = replayContent;
    }

    public String getReplyContent() {
        return replyContent;
    }

    public void setReportBelongs(String reportBelongs) {
        this.reportBelongs = reportBelongs;
    }

    public String getReportBelongs() {
        return reportBelongs;
    }
}
